<?php
function connect()
{
    $infoDB = parse_ini_file("../../common/scripts/conf.ini");
    
    $dbhost = $infoDB['host'];
    $dbuser = $infoDB['user'];
    $dbpass = $infoDB['password'];
    $dbname = $infoDB['dbname'];
    
    $conexion = new mysqli($dbhost,$dbuser,$dbpass,$dbname);
    
    if($conexion->connect_error){
            die("Error en la conexion : ".$conexion->connect_errno.
                                     "-".$conexion->connect_error);
    }

    return $conexion;
} 

?>